package com.iweb.demo1;

import java.util.Scanner;

public class HelloWorld {
    public static void main(String[] args) {
//        float f = 3.4;
//        float f = 3.4f;
//        float f = (float)3.4;
//        System.out.println(f);
        int a = 10;
        int b = 20;
        int max = a>b?a:b;
        System.out.println(max);
//        求绝对值
        int c = -5;
        int jdz = c>0?c:-c;
        System.out.println(jdz);
//        三个数的最大值
        int n1 = 10;
        int n2 = 30;
        int n3 = 5;
        int max1 = n1>n2?n1:n2;
        int max2 = max1>n3?max1:n3;
        System.out.println(max2);

        Scanner sc = new Scanner(System.in);
        System.out.println("输入一个数：");
        int i = sc.nextInt();
        System.out.println(i);
    }
}
